// 退宿
import request from '@/router/axios'

//展示表格
export function showBuildingList(query) {
    return request({
        url: '/campus/building/page',
        method: 'get',
        params: query
    })
}

//获取楼栋下宿舍数量
export function Buildingcount(id) {
    return request({
        url: '/campus/building/getDormCountOfBuild/' + id,
        method: 'get',
        params: id
    })
}

//增加楼栋
export function addBuilding(obj) {
    return request({
        url: '/campus/building',
        method: 'post',
        data: obj
    })
}

//编辑楼栋
export function editBuilding(obj) {
    return request({
        url: '/campus/building',
        method: 'put',
        data: obj
    })
}

//删除楼栋
export function delBuilding(id) {
    return request({
        url: '/campus/building/' + id,
        method: 'delete',
    })
}

//批量删除楼栋
export function delBuildingObjs(ids) {
    return request({
        url: '/campus/building/deleteBatch/' + ids,
        method: 'delete',

    })
}

//获得统计楼栋下宿舍数量
export function getCountbybuilding() {
    return request({
        url: '/campus/dorm/countbybuilding/',
        method: 'get',
    })
}